package VIEW;

import javax.swing.JOptionPane;

public class frm_TelaPrincipal extends javax.swing.JFrame {

    
    public frm_TelaPrincipal() {
        initComponents();
        setExtendedState(MAXIMIZED_BOTH); 
    }

   
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jXTaskPaneContainerBeanInfo1 = new org.jdesktop.swingx.JXTaskPaneContainerBeanInfo();
        jPanel1 = new javax.swing.JPanel();
        jButton_clientes = new javax.swing.JButton();
        jButton_estoque = new javax.swing.JButton();
        jButton_fornecedor = new javax.swing.JButton();
        jButton_pedido = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jButton_reletórios = new javax.swing.JButton();
        Desktop = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu_arquivo = new javax.swing.JMenu();
        jMenu_cadastros = new javax.swing.JMenu();
        jMenu_clientes = new javax.swing.JMenu();
        cliente_fisico = new javax.swing.JMenuItem();
        jSeparator7 = new javax.swing.JPopupMenu.Separator();
        cliente_juridico = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        jMenuItem_produtos = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        jMenuItem_fornecedores = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JPopupMenu.Separator();
        jMenuItem_usuários = new javax.swing.JMenuItem();
        jSeparator6 = new javax.swing.JPopupMenu.Separator();
        jMenu_consultas = new javax.swing.JMenu();
        jMenuItem_consultas_produtos = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JPopupMenu.Separator();
        jMenuItem_consultas_fornecedor = new javax.swing.JMenuItem();
        jSeparator5 = new javax.swing.JPopupMenu.Separator();
        jMenuItem_consultas_clientes = new javax.swing.JMenuItem();
        jMenu_ferramentas = new javax.swing.JMenu();
        jMenu_financeiro = new javax.swing.JMenu();
        jMenu_sobre = new javax.swing.JMenu();
        jMenu_sair = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("SISTEMA DE CONTROLE DE ESTOQUE");

        jPanel1.setBackground(new java.awt.Color(196, 218, 192));

        jButton_clientes.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton_clientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/54.png"))); // NOI18N
        jButton_clientes.setText("CLIENTES");
        jButton_clientes.setToolTipText("CADASTRO DE CLIENTES");
        jButton_clientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_clientesActionPerformed(evt);
            }
        });

        jButton_estoque.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton_estoque.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/78.png"))); // NOI18N
        jButton_estoque.setText("PRODUTOS");
        jButton_estoque.setToolTipText("CADASTRO DE PRODUTOS");
        jButton_estoque.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_estoqueActionPerformed(evt);
            }
        });

        jButton_fornecedor.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton_fornecedor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/66.png"))); // NOI18N
        jButton_fornecedor.setText("FORNECEDOR");
        jButton_fornecedor.setToolTipText("CADASTRO DE FORNECEDORES");
        jButton_fornecedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_fornecedorActionPerformed(evt);
            }
        });

        jButton_pedido.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton_pedido.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/44.png"))); // NOI18N
        jButton_pedido.setText("PEDIDOS");
        jButton_pedido.setToolTipText("EMISSÃO DE PEDIDOS");
        jButton_pedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_pedidoActionPerformed(evt);
            }
        });

        jButton1.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/49.png"))); // NOI18N
        jButton1.setText("USUÁRIOS");
        jButton1.setToolTipText("CADASTRO DE USUÁRIOS");
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton1MouseClicked(evt);
            }
        });
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton_reletórios.setFont(new java.awt.Font("Tahoma", 1, 10));
        jButton_reletórios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/81.png"))); // NOI18N
        jButton_reletórios.setText("RELATÓRIOS");
        jButton_reletórios.setToolTipText("RELATÓRIOS");
        jButton_reletórios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_reletóriosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_clientes, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_estoque, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_fornecedor, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_pedido, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_reletórios, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(252, Short.MAX_VALUE))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButton1, jButton_clientes, jButton_estoque, jButton_fornecedor, jButton_pedido, jButton_reletórios});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_clientes, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)
                    .addComponent(jButton_estoque, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)
                    .addComponent(jButton_fornecedor, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton_pedido, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)
                        .addComponent(jButton_reletórios, javax.swing.GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)))
                .addGap(16, 16, 16))
        );

        Desktop.setBackground(new java.awt.Color(255, 255, 255));

        jMenu_arquivo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/1.png"))); // NOI18N
        jMenu_arquivo.setMnemonic('A');
        jMenu_arquivo.setText("ARQUIVO");
        jMenu_arquivo.setToolTipText("ARQUIVO");
        jMenuBar1.add(jMenu_arquivo);

        jMenu_cadastros.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/2.png"))); // NOI18N
        jMenu_cadastros.setMnemonic('C');
        jMenu_cadastros.setText("CADASTROS");
        jMenu_cadastros.setToolTipText("CADASTROS");
        jMenu_cadastros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu_cadastrosActionPerformed(evt);
            }
        });

        jMenu_clientes.setText("CLIENTES");

        cliente_fisico.setText("PESSOA FÍSICA");
        jMenu_clientes.add(cliente_fisico);
        jMenu_clientes.add(jSeparator7);

        cliente_juridico.setText("PESSOA JURÍDICA");
        jMenu_clientes.add(cliente_juridico);

        jMenu_cadastros.add(jMenu_clientes);
        jMenu_cadastros.add(jSeparator1);

        jMenuItem_produtos.setText("PRODUTOS");
        jMenuItem_produtos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_produtosActionPerformed(evt);
            }
        });
        jMenu_cadastros.add(jMenuItem_produtos);
        jMenu_cadastros.add(jSeparator2);

        jMenuItem_fornecedores.setText("FORNECEDORES");
        jMenuItem_fornecedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_fornecedoresActionPerformed(evt);
            }
        });
        jMenu_cadastros.add(jMenuItem_fornecedores);
        jMenu_cadastros.add(jSeparator3);

        jMenuItem_usuários.setText("USUÁRIOS");
        jMenuItem_usuários.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenuItem_usuáriosMouseClicked(evt);
            }
        });
        jMenuItem_usuários.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_usuáriosActionPerformed(evt);
            }
        });
        jMenu_cadastros.add(jMenuItem_usuários);
        jMenu_cadastros.add(jSeparator6);

        jMenuBar1.add(jMenu_cadastros);

        jMenu_consultas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/10.png"))); // NOI18N
        jMenu_consultas.setMnemonic('N');
        jMenu_consultas.setText("CONSULTAS");
        jMenu_consultas.setToolTipText("CONSULTAS À MÓDULOS DO SISTEMA");

        jMenuItem_consultas_produtos.setText("PRODUTOS");
        jMenu_consultas.add(jMenuItem_consultas_produtos);
        jMenu_consultas.add(jSeparator4);

        jMenuItem_consultas_fornecedor.setText("FORNECEDOR");
        jMenu_consultas.add(jMenuItem_consultas_fornecedor);
        jMenu_consultas.add(jSeparator5);

        jMenuItem_consultas_clientes.setText("CLIENTES");
        jMenu_consultas.add(jMenuItem_consultas_clientes);

        jMenuBar1.add(jMenu_consultas);

        jMenu_ferramentas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/31.png"))); // NOI18N
        jMenu_ferramentas.setMnemonic('F');
        jMenu_ferramentas.setText("FERRAMENTAS");
        jMenu_ferramentas.setToolTipText("FERRAMENTAS DE SISTEMA");
        jMenuBar1.add(jMenu_ferramentas);

        jMenu_financeiro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/80.png"))); // NOI18N
        jMenu_financeiro.setText("FINANCEIRO");
        jMenuBar1.add(jMenu_financeiro);

        jMenu_sobre.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/65.png"))); // NOI18N
        jMenu_sobre.setMnemonic('B');
        jMenu_sobre.setText("SOBRE");
        jMenu_sobre.setToolTipText("SOBRE O SISTEMA");
        jMenu_sobre.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenu_sobreMouseClicked(evt);
            }
        });
        jMenuBar1.add(jMenu_sobre);

        jMenu_sair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ICONES/116.png"))); // NOI18N
        jMenu_sair.setText("SAIR");
        jMenu_sair.setToolTipText("SAIR DO SISTEMA");
        jMenu_sair.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenu_sairMouseClicked(evt);
            }
        });
        jMenuBar1.add(jMenu_sair);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(Desktop, javax.swing.GroupLayout.DEFAULT_SIZE, 1264, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(Desktop, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1280)/2, (screenSize.height-718)/2, 1280, 718);
    }// </editor-fold>//GEN-END:initComponents

private void jButton_reletóriosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_reletóriosActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton_reletóriosActionPerformed

private void jMenu_sairMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_sairMouseClicked

    if (JOptionPane.showConfirmDialog(null, "Deseja encerrar o sistema?", "Encerrar o sistema", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) {
                System.exit(0); 
    } 
    
}//GEN-LAST:event_jMenu_sairMouseClicked

private void jButton_fornecedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_fornecedorActionPerformed
  CriaInternalFornecedores();
}//GEN-LAST:event_jButton_fornecedorActionPerformed

private void jMenuItem_fornecedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_fornecedoresActionPerformed
         CriaInternalFornecedores();
}//GEN-LAST:event_jMenuItem_fornecedoresActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

   
}//GEN-LAST:event_jButton1ActionPerformed

private void jButton_pedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_pedidoActionPerformed
        CriaInternalPedidos();
}//GEN-LAST:event_jButton_pedidoActionPerformed

private void jButton_clientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_clientesActionPerformed
        CriaInternalClientes();
}//GEN-LAST:event_jButton_clientesActionPerformed

private void jButton_estoqueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_estoqueActionPerformed
        CriaInternalProdutos();
}//GEN-LAST:event_jButton_estoqueActionPerformed

private void jMenuItem_produtosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_produtosActionPerformed
        CriaInternalProdutos();
}//GEN-LAST:event_jMenuItem_produtosActionPerformed

private void jMenu_cadastrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu_cadastrosActionPerformed
        
}//GEN-LAST:event_jMenu_cadastrosActionPerformed

private void jMenuItem_usuáriosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenuItem_usuáriosMouseClicked
          CriaInternalUsuarios();
}//GEN-LAST:event_jMenuItem_usuáriosMouseClicked

private void jMenuItem_usuáriosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_usuáriosActionPerformed
          CriaInternalUsuarios();
}//GEN-LAST:event_jMenuItem_usuáriosActionPerformed

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
          CriaInternalUsuarios();
}//GEN-LAST:event_jButton1MouseClicked

private void jMenu_sobreMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_sobreMouseClicked
          CriaInternalSobre();
}//GEN-LAST:event_jMenu_sobreMouseClicked

    
    public static void main(String args[]) {
        
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new frm_TelaPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane Desktop;
    private javax.swing.JMenuItem cliente_fisico;
    private javax.swing.JMenuItem cliente_juridico;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton_clientes;
    private javax.swing.JButton jButton_estoque;
    private javax.swing.JButton jButton_fornecedor;
    private javax.swing.JButton jButton_pedido;
    private javax.swing.JButton jButton_reletórios;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem_consultas_clientes;
    private javax.swing.JMenuItem jMenuItem_consultas_fornecedor;
    private javax.swing.JMenuItem jMenuItem_consultas_produtos;
    private javax.swing.JMenuItem jMenuItem_fornecedores;
    private javax.swing.JMenuItem jMenuItem_produtos;
    private javax.swing.JMenuItem jMenuItem_usuários;
    private javax.swing.JMenu jMenu_arquivo;
    private javax.swing.JMenu jMenu_cadastros;
    private javax.swing.JMenu jMenu_clientes;
    private javax.swing.JMenu jMenu_consultas;
    private javax.swing.JMenu jMenu_ferramentas;
    private javax.swing.JMenu jMenu_financeiro;
    private javax.swing.JMenu jMenu_sair;
    private javax.swing.JMenu jMenu_sobre;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    private javax.swing.JPopupMenu.Separator jSeparator3;
    private javax.swing.JPopupMenu.Separator jSeparator4;
    private javax.swing.JPopupMenu.Separator jSeparator5;
    private javax.swing.JPopupMenu.Separator jSeparator6;
    private javax.swing.JPopupMenu.Separator jSeparator7;
    private org.jdesktop.swingx.JXTaskPaneContainerBeanInfo jXTaskPaneContainerBeanInfo1;
    // End of variables declaration//GEN-END:variables

    internalFrameClientes InternalClientes;
    internalFrameFornecedores InternalFornecedores;
    internalFrameProdutos InternalProdutos;
    internalFrameUsuarios InternalUsuarios;
    internalFramePedidos InternalPedidos;
    internalFrameSobre InternalSobre; 
    
    //Classes que constroem os internal da tela principal
    //CRIA JANELA DOS CLIENTES
    public void CriaInternalClientes() {
      if(InternalClientes == null) {
          InternalClientes = new internalFrameClientes();  
      }
      else{
          Desktop.remove(InternalClientes);
          //InternalClientes.setVisible(false);
      }
          Desktop.add(InternalClientes);
          InternalClientes.setVisible(true);
          InternalClientes.setPosicao();
    }
    //CRIA JANELA DOS FORNECEDORES

    public void CriaInternalFornecedores() {
      if(InternalFornecedores == null) {
          InternalFornecedores = new internalFrameFornecedores();  
      }
      else{
          Desktop.remove(InternalFornecedores);
         //InternalClientes.setVisible(false);
      }
          Desktop.add(InternalFornecedores);
          InternalFornecedores.setVisible(true);
          InternalFornecedores.setPosicao();
    }
    
    //CRIA JANELA DOS PRODUTOS
    public void CriaInternalProdutos() {
      if(InternalProdutos == null) {
          InternalProdutos = new internalFrameProdutos();  
      }
      else{
          Desktop.remove(InternalProdutos);
          //InternalProdutos.setVisible(false);
      }
          Desktop.add(InternalProdutos);
          InternalProdutos.setVisible(true);
          InternalProdutos.setPosicao();
    }   
    public void CriaInternalUsuarios() {
      if(InternalUsuarios == null) {
          InternalUsuarios = new internalFrameUsuarios();  
      }
      else{
          Desktop.remove(InternalUsuarios);
          //InternalUsuarios.setVisible(false);
      }
          Desktop.add(InternalUsuarios);
          InternalUsuarios.setVisible(true);
          InternalUsuarios.setPosicao();
    }  
    public void CriaInternalPedidos() {
      if(InternalPedidos == null) {
          InternalPedidos = new internalFramePedidos();  
      }
      else{
          Desktop.remove(InternalPedidos);
          //InternalPedidos.setVisible(false);
      }
          Desktop.add(InternalPedidos);
          InternalPedidos.setVisible(true);
          InternalPedidos.setPosicao();
    }  
    //CRIA JANELA DE SOBRE O SISTEMA
    public void CriaInternalSobre() {
      if(InternalSobre == null) {
          InternalSobre = new internalFrameSobre();  
      }
      else{
          Desktop.remove(InternalSobre);
          //InternalSobre.setVisible(false);
      }
          Desktop.add(InternalSobre);
          InternalSobre.setVisible(true);
          InternalSobre.setPosicao();
    }
}
